package com.lfsenior.listmq;

import redis.clients.jedis.Jedis;

import java.util.List;

/**
 * Created by dlupan on 2018/10/15
 */
public class ScheduleMQ extends Thread{
    Jedis jedis = new Jedis("127.0.0.1", 6379);
    @Override
    public void run() {
        while (true){

            List<String> list = jedis.brpop(0, "msgList");
            for (String msg:list) {
                System.out.println("consumer:"+msg);
            }
        }
    }
}
